git commit -m 与 git commit -am 的区别

作者: 李多多 日期: 2019-09-26
Git
git commit -m 与 git commit -am 的区别

第三步等于第一步第二步的结合,如下:

1 $ git add .
2 $ git commit -m "xxx"

3 $ git commit -am "xxx" (第三步等于第一步和第二步)

区别: 如果是新增的文件就必须使用第一步和第二步的命令; git commit -am ‘xxx’命令只能提交已经跟踪过且修改了的文件。